﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListFormInner.aspx.cs"
    Inherits="ServBus.ListForm2010.Layouts.ListForm2010.ListFormInner" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>
        <asp:Literal runat="server" ID="ltListTitle" /></title>
    <base target="_self" />
    <link title="winter" media="all" href="css/calendar-blue.css" type="text/css" rel="stylesheet" />
    <link media="all" href="css/InfoBus.css" type="text/css" rel="stylesheet" />
    <script src="js/calendar.js" type="text/javascript"></script>
    <script src="js/calendar-en.js" type="text/javascript"></script>
    <script src="js/calendar-setup.js" type="text/javascript"></script>
    <script src="js/infojet.js" type="text/javascript"></script>
    <script src="js/ListForm.js" type="text/javascript"></script>
    <script src="js/nicEdit.js" type="text/javascript"></script>
    <script src="js/nicEdit.custom.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jquery-1.5.min.js"></script>
    <script type="text/javascript" src="/_layouts/entityeditor.js"></script>
    <script type="text/javascript" src="/_layouts/1033/init.js"></script>
    <script type="text/javascript" src="/_layouts/1033/core.js"></script>
    <script type="text/javascript">
        function saveFormPart_Inner() {
            if (!checkValidate())
                return;
            var id = '<%= SaveBtn.ClientID %>';
            var savebtn = document.getElementById(id);
            savebtn.style.display = "";
            savebtn.style.height = "1";
            savebtn.style.width = "1";
            savebtn.focus();
            savebtn.click();
            savebtn.style.display = "none";
            window.setTimeout(function () {
                if (InfoJet_Postbacking == 0) {
                    savebtn.click();
                    savebtn.style.display = "none";
                } else {
                    window.setTimeout(saveFormAfterPostback, 100);
                }
            }, 0);
        }

        function saveFormAfterPostback() {
            if (InfoJet_Postbacking == 0) {
                var id = '<%= SaveBtn.ClientID %>';
                var savebtn = document.getElementById(id);
                savebtn.click();
                savebtn.style.display = "none";
            } else {
                window.setTimeout(saveFormAfterPostback, 100);
            }
        }

        function deleteFormPart_Inner() {
            if (window.confirm('Are you sure you want to send the item to the site Recycle Bin?')) {

                var id = '<%= DeleteBtn.ClientID %>';
                var deletebtn = document.getElementById(id);
                deletebtn.style.display = "";
                deletebtn.focus();
                deletebtn.click();
                deletebtn.style.display = "none";
            }
        }
        function getXdocHeight_Inner() {
            return getDocumentHeight(window.document);
        }
        function getXdocWidth_Inner() {
            return getDocumentWidth(window.document);
        }
    </script>
</head>
<body onload="if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();InfoJet_Init();">
    <form id="Form1" runat="server" style="padding: 0px">
    <div id="ribbonbar" style="display: block;">
        <table width="100%">
            <tr>
                <td>
                    <asp:Label ID="FormTitle" runat="server" Text=""></asp:Label>
                </td>
                <td align="right">
                    <asp:Button ID="SaveBtn" runat="server" Text="Save" OnClick="SaveBtn_Click" Style="display: none;" />
                    <asp:Button ID="DeleteBtn" runat="server" Text="Delete" OnClick="DeleteBtn_Click"
                        Style="display: none;" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="xDocViewInner" runat="server" EnableViewState="False"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                <div  style="color:red;font-size:1.2em;font-weight:bold;padding-left:15px">
                    <asp:Literal ID="LTException" runat="server" EnableViewState="False" Visible="false"></asp:Literal>
                    </div>
                    <asp:Panel ID="errorPanel" runat="server" Visible="false">
                        <br />
                        <div style="color: red; font-size: 1.2em; font-weight: bold; padding-left: 15px">
                            Oops! There must be something wrong, please try again later.
                            <br />
                            If you've failed for several times, please contact administrator.
                        </div>
                    </asp:Panel>
                </td>
            </tr>
        </table>
        <asp:Literal runat="server" ID="ltScript"></asp:Literal></div>
    </form>
</body>
</html>
